package cn.biplam.front.component.view.mdManage.buffer2md.main.callback;

import cn.biplam.common.paramters.ModelImportParam.Operator_Type;
import cn.biplam.common.struc.MdStruc;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.Result;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.callback.CallBack;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.base.Text;

/**
 * 模型对象导入，处理字段绑定器
 * @author XiaoRuxing 2009-6-22下午03:59:24
 * @version 1.0
 */
public class Buffer2MdDealCallBack implements CallBack{

	public HtmlWindow[] getGroup(Result data, String homeUrl, UserInfo mUser)
			throws ErrorMessage {
		HtmlWindow[] opetator=new HtmlWindow[1];
		
		/** 处理信息 */
		String deal = data.getString(MdStruc.ImpCompTabStruc.OPERATOR_TYPE);
		if(Operator_Type.Ignore.toString().equals(deal)){
			deal = "=";
		}else if(Operator_Type.Update.toString().equals(deal)){
			deal = "->";
		}else if(Operator_Type.Delete.toString().equals(deal)){
			deal = "del";
		}
		opetator[0]= new Text(deal).get(); 
		return opetator;
	}

}
